package com.demo.controller;

import com.demo.cpu.MonitorInfoBean;
import com.demo.service.IMonitorService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName : com.demo.controller.CpuController
 * @Description : 类描述
 * Created by cyd on 2021-11-10 16:44:54
 */
@RestController
@RequestMapping("/cpu")
public class CpuController {

    @Resource
    IMonitorService monitorService;

    @GetMapping("/getMonitorInfoBean")
    public MonitorInfoBean getMonitorInfoBean() throws Exception {
        return monitorService.getMonitorInfoBean();
    }

    @GetMapping("/demo")
    public String demo() throws Exception {
        return "hello world";
    }
}
